<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>N3RD CH4T: /Users/plamontagna/Documents/spa-cs340project/im_client_v2/contactlist.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">N3RD CH4T
   &#160;<span id="projectnumber">Final Version</span>
   </div>
   <div id="projectbrief">CS340 Project</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">/Users/plamontagna/Documents/spa-cs340project/im_client_v2/contactlist.h</div>  </div>
</div>
<div class="contents">
<a href="contactlist_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00019"></a>00019 <span class="comment"></span><span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef CONTACTLIST_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define CONTACTLIST_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;QMainWindow&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;QErrorMessage&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;<a class="code" href="client_8h.html" title="Header file for client.cpp.">client.h</a>&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;qlistwidget.h&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;QVector&quot;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="chatwindow_8h.html" title="Header file for chatWindow.cpp.">chatwindow.h</a>&quot;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;QCloseEvent&quot;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &quot;<a class="code" href="friendrequestswindow_8h.html" title="Header file for friendRequestsWindow.cpp.">friendrequestswindow.h</a>&quot;</span>
<a name="l00032"></a>00032 <span class="keyword">namespace </span>Ui {
<a name="l00033"></a>00033     <span class="keyword">class </span><a class="code" href="class_contact_list.html" title="The ContactList helper methods.">ContactList</a>;
<a name="l00034"></a>00034 }
<a name="l00035"></a>00035 
<a name="l00043"></a><a class="code" href="class_contact_list.html">00043</a> <span class="keyword">class </span><a class="code" href="class_contact_list.html" title="The ContactList helper methods.">ContactList</a> : <span class="keyword">public</span> QMainWindow
<a name="l00044"></a>00044 {
<a name="l00045"></a>00045     Q_OBJECT
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 <span class="keyword">public</span>:
<a name="l00049"></a>00049     <span class="keyword">explicit</span> <a class="code" href="class_contact_list.html#ab1f1019afcf75c01e8297e215e8d44f9" title="Explicit Constructor for ContactList.">ContactList</a>(QWidget *parent = 0);
<a name="l00050"></a>00050 
<a name="l00052"></a>00052     <a class="code" href="class_contact_list.html#ab1f1019afcf75c01e8297e215e8d44f9" title="Explicit Constructor for ContactList.">ContactList</a>(QWidget *parent, <a class="code" href="class_client.html" title="The Client helper methods.">Client</a>* client);
<a name="l00053"></a>00053 
<a name="l00055"></a>00055     <a class="code" href="class_contact_list.html#a8f3361944a317712dff8835d4eba8970" title="Deconstructor for ContactList.">~ContactList</a>();
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 
<a name="l00058"></a>00058     <span class="keywordtype">void</span> closeEvent(QCloseEvent *);
<a name="l00059"></a>00059 
<a name="l00060"></a>00060 <span class="keyword">private</span> slots:
<a name="l00061"></a>00061 
<a name="l00068"></a>00068     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#ac88b01325eb1c8e62860791714e40a5e" title="Slot that will determine if a user has been clicked on the ContactList.">on_listWidget_itemClicked</a>(QListWidgetItem* item);
<a name="l00069"></a>00069 
<a name="l00076"></a>00076     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#a936b252866aced12a7d5b8cdb3f63ec0" title="Slot that will add a userName to the ContactList.">populateList</a>(QStringList);
<a name="l00077"></a>00077 
<a name="l00078"></a>00078 
<a name="l00088"></a>00088     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#a40f2b1a0e9932ab2473e75bfac27fed6" title="Slot that sends the message with message attributes.">sendMessage</a>(QString,QString,QString,QString);
<a name="l00089"></a>00089 
<a name="l00098"></a>00098     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#aaef8c20a5b819565a307f1e0133b47c2" title="Slot that receives the message.">receiveMessage</a>(QString,QString,QString,QString);
<a name="l00099"></a>00099 
<a name="l00104"></a>00104     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#aa5d1b7c12f86adfc63ec909f5a66456b" title="Slot that determines if the user clicks the exit button.">on_ExitButton_clicked</a>();
<a name="l00105"></a>00105 
<a name="l00110"></a>00110     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#a1eeeb69f2d97bb6dc3b5b4cb6f1834f1" title="Slot that determines if the user clicks the settings button.">on_Settings_clicked</a>();
<a name="l00111"></a>00111 
<a name="l00116"></a>00116     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#a8e862650787be196bca3b7d1d65aa488" title="Slot that determines if the user clicks the remove buddy button.">on_RemoveBuddy_clicked</a>();
<a name="l00117"></a>00117 
<a name="l00121"></a>00121     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#ac675975c3da535634117b68cf1c3d753" title="Slot that determines if the user clicks the add buddy button.">on_AddBuddy_clicked</a>();
<a name="l00122"></a>00122 
<a name="l00127"></a>00127     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#ab4a689df858dd5cbe516a109316f9e9d" title="Slot that determines if the user closes the add buddy window.">handleAddBuddyWindowClosed</a>();
<a name="l00128"></a>00128 
<a name="l00133"></a>00133     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#a886262bc8320286acb4cb5162e93c893" title="Slot that determines if the user closes the remove buddy window.">handleRemoveBuddyWindowClosed</a>();
<a name="l00134"></a>00134 
<a name="l00139"></a>00139     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#a912cae2f46bd2c8aea8b8350c53f2178" title="Slot that determines if the user clicks the friend request button.">on_requestsButton_clicked</a>();
<a name="l00140"></a>00140 
<a name="l00141"></a>00141     <span class="keyword">private</span>:
<a name="l00142"></a>00142     Ui::ContactList *ui;
<a name="l00143"></a>00143 
<a name="l00145"></a><a class="code" href="class_contact_list.html#a4902e37cb8edc99c1c478ac0b5e49cea">00145</a>     QString <a class="code" href="class_contact_list.html#a4902e37cb8edc99c1c478ac0b5e49cea" title="Username variable.">userName</a>;
<a name="l00146"></a>00146 
<a name="l00148"></a><a class="code" href="class_contact_list.html#a16c07f6452fd22bfb4ca3071e75d7f54">00148</a>     <a class="code" href="class_client.html" title="The Client helper methods.">Client</a> *<a class="code" href="class_contact_list.html#a16c07f6452fd22bfb4ca3071e75d7f54" title="Main socket variable.">mainSoc</a>;
<a name="l00149"></a>00149 
<a name="l00151"></a><a class="code" href="class_contact_list.html#a6576726086f9b9ead5e525d480aa4e02">00151</a>     QVector &lt;chatWindow *&gt; *<a class="code" href="class_contact_list.html#a6576726086f9b9ead5e525d480aa4e02" title="Chat list variable.">chatList</a>;
<a name="l00152"></a>00152 
<a name="l00154"></a><a class="code" href="class_contact_list.html#ade303b1210017b474400dedcea0f915b">00154</a>     <a class="code" href="classfriend_requests_window.html" title="The friendRequestsWindow helper methods.">friendRequestsWindow</a> *<a class="code" href="class_contact_list.html#ade303b1210017b474400dedcea0f915b" title="Instance of a request window.">requestsWindow</a>;
<a name="l00155"></a>00155 
<a name="l00156"></a>00156 signals:
<a name="l00157"></a>00157 
<a name="l00164"></a>00164     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#a3a5c57a8c0bbe5a7f6fd8350122cb580" title="Signal that sends the username.">passName</a>(QString);
<a name="l00165"></a>00165 
<a name="l00172"></a>00172     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#ac9e57f3c02887a5475a88a354c1c0027" title="Signal that sends the address of the user.">passHost</a>(QString);
<a name="l00173"></a>00173 
<a name="l00179"></a>00179     <span class="keywordtype">void</span> <a class="code" href="class_contact_list.html#a4a76120938512ead7848ccf99b47034b" title="Signal sends the number of friends.">passNumFriends</a>(QString);
<a name="l00180"></a>00180 };
<a name="l00181"></a>00181 
<a name="l00182"></a>00182 <span class="preprocessor">#endif // CONTACTLIST_H</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Tue Nov 29 2011 23:53:09 for N3RD CH4T by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
